package com.jy.adscm.zltx.bean;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.jy.adscm.core.interceptor.DateJsonDeserializer;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * <p>
 * 图纸的部门会审表
 * </p>
 *
 * @author yyy
 * @since 2018-11-07
 */
public class JyDrawingAuditing implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private Long drawingEditId;//修订记录ID
    private Integer auditingDept;//审核部门
    @TableField(exist = false)
    private String auditingDeptName;
    private Integer auditor;
    @TableField(exist = false)
    private String auditorName;
    private String  auditingResult;//审核结果
    private String auditingRemark;//审核批注
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date aduditingDate;

    public String getAuditingDeptName() {
        return auditingDeptName;
    }

    public void setAuditingDeptName(String auditingDeptName) {
        this.auditingDeptName = auditingDeptName;
    }

    public String getAuditorName() {
        return auditorName;
    }

    public void setAuditorName(String auditorName) {
        this.auditorName = auditorName;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getDrawingEditId() {
        return drawingEditId;
    }

    public void setDrawingEditId(Long drawingEditId) {
        this.drawingEditId = drawingEditId;
    }

    public Integer getAuditingDept() {
        return auditingDept;
    }

    public void setAuditingDept(Integer auditingDept) {
        this.auditingDept = auditingDept;
    }

    public Integer getAuditor() {
        return auditor;
    }

    public void setAuditor(Integer auditor) {
        this.auditor = auditor;
    }

    public String getAuditingResult() {
        return auditingResult;
    }

    public void setAuditingResult(String  auditingResult) {
        if (auditingResult != null && !"".equals(auditingResult)){
            this.auditingResult = auditingResult;
        }else {
            this.auditingResult = "0";
        }
    }

    public String getAuditingRemark() {
        return auditingRemark;
    }

    public void setAuditingRemark(String auditingRemark) {
        this.auditingRemark = auditingRemark;
    }

    public Date getAduditingDate() {
        return aduditingDate;
    }
    @JsonDeserialize(using = DateJsonDeserializer.class)
    public void setAduditingDate(Date aduditingDate) {
        this.aduditingDate = aduditingDate;
    }

    @Override
    public String toString() {
        return "JyDrawingAuditing{" +
        "id=" + id +
        ", drawingEditId=" + drawingEditId +
        ", auditingDept=" + auditingDept +
        ", auditor=" + auditor +
        ", auditingResult=" + auditingResult +
        ", auditingRemark=" + auditingRemark +
        ", aduditingDate=" + aduditingDate +
        "}";
    }
}
